package com.fth.learn.chapter08;

/**
 * 马场
 * YiMi
 *
 * @author YiMi
 * @version 1.0
 * @date 2023/7/21 10:27
 */

public class HorseSpace {


    /**
     * 场
     *
     * @author kangjx
     * @version 1.0
     * @date 2023/7/21 上午9:29
     */

        private int hsno;

        private String hsNaME;

        private Horse[] hourses;//定义马数组

        /**
         * 类的结构 :
         *
         * {}
         *
         * 构造方法 : 实例化  new
         */
        public HorseSpace(int capacity){
            hourses = new Horse[capacity];
        }

        public static void main(String[] args) {
            HorseSpace h1 = new HorseSpace(12);

            Horse s1 = new Horse();
            h1.hourses[0] = s1;
            h1.hourses[1] = new Horse();
            h1.hourses[1] = new Horse();
            h1.hourses[1] = new Horse();
            h1.hourses[1] = new Horse();
            h1.hourses[1] = new Horse();



        }

}
